package com.chat.rabbitmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;
import java.nio.channels.Channel;


/**
 * 消费者测试
 *
 * @author mhw
 * @version v1.0
 * @date 2019-11-15
 */
@Slf4j
@Component
@RocketMQMessageListener(
        topic = "chatTopic",
        consumerGroup = "chat",
        selectorExpression = "chatTag"
)
public class TestConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        log.info("消费端测试，数据：【{}】", s);
    }
}
